package cn.fl.riskctrl.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import fl.constant.facade.framework.constant.DictionaryConstant;
import fl.customer.facade.customer.api.ICustomerQueryApiService;
import fl.customer.facade.customer.dto.CstBscInfoDTO;
import fl.customer.facade.customer.dto.CstCertRecDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import cmm.mid.core.framework.page.DataResultVO;
import cmm.web.core.framework.controller.BaseController;
import cn.cmm.base.framework.constant.BaseConstant;
import cn.cmm.base.framework.exception.BaseException;
import cn.cmm.base.framework.utils.BaseLogUtils;
import cn.cmm.base.framework.utils.StringUtils;
import cn.cmm.cache.framework.utils.PropertiesCacheUtils;
import cn.fl.framework.base.context.CurrentThreadContext;
import cn.fl.riskctrl.service.IRskCtrlService;
import cn.fl.system.constant.SysLogConstant;
import fl.constant.facade.framework.constant.UploadConstant;
import fl.riskctrl.facade.riskctrl.dto.DataResultDTO;

/**
 * @Description: 风险控制-控制层
 */
@Controller
@RequestMapping("/riskctrl/rskctrl")
public class RskCtrlController  extends BaseController {

	private static final Logger logger = LoggerFactory.getLogger(RskCtrlController.class);
	
	/**
	 * 风控服务
	 */
	@Autowired
	private IRskCtrlService rskCtrlService;

	/**客户服务*/
	@Autowired
	public ICustomerQueryApiService customerQueryApiService;
	
	/**
	 * 到征信主页面
	 */
	@RequestMapping(value = "/toMainPage.do", method = { RequestMethod.GET })
	public ModelAndView toMainPage(HttpServletRequest request, HttpServletResponse response) {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "toMainPage", " 到征信主页面.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("id");//项目ID
		ModelAndView view = new ModelAndView("riskctrl/riskctrl/riskCtrlMain");
		String path = PropertiesCacheUtils.getProperty(UploadConstant.UPLOAD_SERVER_PATH);
		view.addObject("zx_path", path);
		view.addObject("zx_prjid", prjId);
		this.rskCtrlService.setCstIdForView(Long.valueOf(prjId), view);//这里要根据项目ID获取客户ID和所有担保人信息
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "toMainPage", " 到征信主页面.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return view;
	}

	/**
	 * 重卡流程
	 */
	@RequestMapping(value = "/toZkMainPage.do", method = { RequestMethod.GET })
	public ModelAndView toZkMainPage(HttpServletRequest request, HttpServletResponse response) {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "toZkMainPage", " 重卡流程.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("id");//项目ID
		ModelAndView view = new ModelAndView("riskctrl/riskctrl/riskCtrlZkMain");
		String path = PropertiesCacheUtils.getProperty(UploadConstant.UPLOAD_SERVER_PATH);
		view.addObject("zx_path", path);
		view.addObject("zx_prjid", prjId);
		this.rskCtrlService.setCstIdForView(Long.valueOf(prjId), view);//这里要根据项目ID获取客户ID和所有担保人信息
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "toZkMainPage", " 重卡流程.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return view;
	}
	
//	/**rskctrlrec
//	 * 获取风控数据
//	 */
//	@RequestMapping(value = "/getRiskCtrlData.do", method = { RequestMethod.GET })
//	@ResponseBody
//	public Object getRiskCtrlData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
//        Long startTm = System.currentTimeMillis();
//        BaseLogUtils.info(logger, "getRiskCtrlData", " 获取风控数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
//		String prjId = request.getParameter("prjId");//项目ID
//		String cstId = request.getParameter("cstId");//客户ID
//
//		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
//		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
//			result.setSuccess(BaseConstant.IS_YESNO_NO);
//			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
//			BaseLogUtils.info(logger, "getRiskCtrlData", this.getRequestParameter(request));
//			return result;
//		}
//		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
//		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
//		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
//			result.setSuccess(BaseConstant.IS_YESNO_NO);
//			result.setInfo("被查询人为法人!");
//			BaseLogUtils.info(logger, "getRiskCtrlData", this.getRequestParameter(request));
//			return result;
//		}
//		try {
//			DataResultDTO data = this.rskCtrlService.getRiskCtrlIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
//			result.setData(data.getData());
//		} catch (BaseException ex) {
//			BaseLogUtils.error(logger, "-", "异常", ex);
//			result.setSuccess(BaseConstant.IS_YESNO_NO);
//			result.setInfo(ex.getMessage());
//			BaseLogUtils.info(logger, "getRiskCtrlData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
//		} catch (Exception ex) {
//			BaseLogUtils.error(logger, "-", "异常", ex);
//			result.setSuccess(BaseConstant.IS_YESNO_NO);
//			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
//			BaseLogUtils.error(logger, "getRiskCtrlData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
//		}
//        Long endTm = System.currentTimeMillis();
//        BaseLogUtils.info(logger, "getRiskCtrlData", " 获取风控数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
//		return result;
//	}

	/**
	 * 获取鹏元数据
	 */
	@RequestMapping(value = "/getPYJyIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getPYJyIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPYJyIsCorrectData", " 获取鹏元数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getPYJyIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getPYJyIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkPYJyIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getPYJyIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getPYJyIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPYJyIsCorrectData", " 获取鹏元数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}
	
	/**
	 * 获取鹏元数据
	 */
	@RequestMapping(value = "/getPYJzIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getPYJzIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPYJzIsCorrectData", " 获取鹏元数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getPYJzIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getPYJzIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkPYJzIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getPYJzIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getPYJzIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPYJzIsCorrectData", " 获取鹏元数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}


	/**
	 * 获取鹏元卡交易数据
	 */
	@RequestMapping(value = "/getKJYIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getKJYIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getKJYIsCorrectData", " 获取鹏元卡交易数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getKJYIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getKJYIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkKJYIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getKJYIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getKJYIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getKJYIsCorrectData", " 获取鹏元卡交易数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}


	/**
	 * 获取鹏元三要素手机核查数据
	 */
	@RequestMapping(value = "/getSYSIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getSYSIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getSYSIsCorrectData", " 获取鹏元三要素手机核查数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getSYSIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getSYSIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkSYSIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getSYSIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getSYSIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getSYSIsCorrectData", " 获取鹏元三要素手机核查数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	/**
	 * 获取鹏元学历核查结果
	 */
	@RequestMapping(value = "/getPyEduIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getPyEduIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPyEduIsCorrectData", " 获取鹏元学历核查结果.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getPyEduIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getPyEduIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkPyEduIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getPyEduIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getPyEduIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getCause().getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPyEduIsCorrectData", " 获取鹏元学历核查结果.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	/**
	 * 获取鹏元分核查结果
	 */
	@RequestMapping(value = "/getPyscrIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getPyscrIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPyscrIsCorrectData", " 获取鹏元分核查结果.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getPyscrIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getPyscrIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkPyscrIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getPyscrIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getPyscrIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getCause().getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getPyscrIsCorrectData", " 获取鹏元分核查结果.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}
	
	
	/**
	 * 获取聚信立数据
	 */
	@RequestMapping(value = "/getJXLIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getJXLIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getJXLIsCorrectData", " 获取聚信立数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getJXLIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getJXLIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkJXLIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getJXLIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getJXLIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getJXLIsCorrectData", " 获取聚信立数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	
	/**
	 * 获取百融数据
	 */
	@RequestMapping(value = "/getBrIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getBrIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrIsCorrectData", " 获取百融数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getBrIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getBrIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkBrIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getBrIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getBrIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrIsCorrectData", " 获取百融数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	/**
	 * 获取百融不良信息数据
	 */
	@RequestMapping(value = "/getBrblIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getBrblIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrblIsCorrectData", " 获取百融不良信息数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getBrblIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getBrblIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkBrblIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getBrblIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getBrblIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrblIsCorrectData", " 获取百融不良信息数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	/**
	 * 获取百融个人信息关联数据
	 */
	@RequestMapping(value = "/getBrPersonIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getBrPersonIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrPersonIsCorrectData", " 获取百融个人信息关联数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getBrPersonIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getBrPersonIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkBrPersonIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getBrPersonIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getBrPersonIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getCause().getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrPersonIsCorrectData", " 获取百融个人信息关联数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	/**
	 * 获取百融手机核查信息
	 */
	@RequestMapping(value = "/getBrtelIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getBrtelIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrtelIsCorrectData", " 获取百融手机核查信息.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getBrtelIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getBrtelIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkBrtelIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getBrtelIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getBrtelIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getCause().getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getBrtelIsCorrectData", " 获取百融手机核查信息.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	/**
	 * 获取同盾手机核查信息
	 */
	@RequestMapping(value = "/getTdtelIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getTdtelIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getTdtelIsCorrectData", " 获取同盾手机核查信息.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getTdtelIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getTdtelIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkTdtelIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getTdtelIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getTdtelIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getCause().getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getTdtelIsCorrectData", " 获取同盾手机核查信息.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}
	/**
	 * 获取同盾手机在网时长
	 */
	@RequestMapping(value = "/getTdMoblieNetwordTime.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getTdMoblieNetwordTime(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getTdMoblieNetwordTime", " 获取同盾手机在网时长.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getTdMoblieNetwordTime", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getTdMoblieNetwordTime", this.getRequestParameter(request));
			return result;
		}
		try {
//			DataResultDTO data = rskCtrlService.checkTdMoblieNetworkTime(Long.valueOf(prjId), Long.valueOf(cstId));
//			result.setData(data.getData());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getTdMoblieNetwordTime", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getTdMoblieNetwordTime", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getCause().getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getTdMoblieNetwordTime", " 获取同盾手机在网时长.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}

	
	/**
	 * 获取同盾数据
	 */
	@RequestMapping(value = "/getTDIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getTDIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getTDIsCorrectData", " 获取同盾数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getTDIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getTDIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkTDIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getTDIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getTDIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getTDIsCorrectData", " 获取同盾数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}
	
	
	/**
	 * 获取中智诚数据
	 */
	@RequestMapping(value = "/getZZCIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getZZCIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getZZCIsCorrectData", " 获取中智诚数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getZZCIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getZZCIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkZZCIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getZZCIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getZZCIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getZZCIsCorrectData", " 获取中智诚数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}
	
	
	/**
	 * 获取担保人数据
	 *//*
	@RequestMapping(value = "/getDBRIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getDBRIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getDBRIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkDBRIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getDBRIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getDBRIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getCause().getMessage(), CurrentThreadContext.getCurrentUserName());
		}
		return result;
	}*/
	
	/**
	 * 获取信加数据
	 */
	@RequestMapping(value = "/getXjIsCorrectData.do", method = { RequestMethod.GET })
	@ResponseBody
	public Object getXjIsCorrectData(HttpServletRequest request, HttpServletResponse response) throws BaseException {
        Long startTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getXjIsCorrectData", " 获取信加数据.请求参数：" + this.getRequestParameter(request), CurrentThreadContext.getCurrentUserName());
		String prjId = request.getParameter("prjId");//项目ID
		String cstId = request.getParameter("cstId");//客户ID
		DataResultVO result = new DataResultVO(BaseConstant.IS_YESNO_YES, SysLogConstant.LOG_CMM_OPERATE_SUCC);
		if (StringUtils.isEmpty(prjId) || StringUtils.isEmpty(cstId)) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("获取征信数据项目ID和客户ID不能为空!");
			BaseLogUtils.info(logger, "getXjIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		String cstTypCd = PropertiesCacheUtils.getProperty(DictionaryConstant.CODE_GRP_CST_TYP_CD_CORP);
		CstBscInfoDTO cstBscInfoDTO = this.customerQueryApiService.getCstBscInfoById(Long.valueOf(cstId));
		if (cstTypCd.equals(cstBscInfoDTO.getCstTypCd())) {
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo("被查询人为法人!");
			BaseLogUtils.info(logger, "getXjIsCorrectData", this.getRequestParameter(request));
			return result;
		}
		try {
			DataResultDTO data = this.rskCtrlService.checkXjIsCorrect(Long.valueOf(prjId), Long.valueOf(cstId));
			result.setData(data.getData());
		} catch (BaseException ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(ex.getMessage());
			BaseLogUtils.info(logger, "getXjIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		} catch (Exception ex) {
			ex.getStackTrace();
			result.setSuccess(BaseConstant.IS_YESNO_NO);
			result.setInfo(SysLogConstant.LOG_CMM_SYS_ERROR);
			BaseLogUtils.error(logger, "getXjIsCorrectData", "获取数据失败!" + this.getRequestParameter(request) + ", ERROR : " + ex.getMessage(), CurrentThreadContext.getCurrentUserName());
		}
        Long endTm = System.currentTimeMillis();
        BaseLogUtils.info(logger, "getXjIsCorrectData", " 获取信加数据.耗时：" + (endTm-startTm), CurrentThreadContext.getCurrentUserName());
		return result;
	}
	
}
